package com.itheima.d01_file_methods;

import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;

public class Test02 {
    public static void main(String[] args)throws IOException {
        //
        //
        //
        //
        FileOutputStream fis = new FileOutputStream("D:\\a.txt");





        int len;
        byte[] bytes = new byte[1024];
        while ((len = fis.getChannel().read(ByteBuffer.wrap(bytes))) != -1) {
            System.out.println(new String(bytes, 0, len));
        }
    }
}
